package com.springcloud.market.common.feign;

import com.springcloud.market.common.model.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "stock-service",path = "/stock")
public interface StockFeignClient {
    @PostMapping("/deduct")
    R<Void> deduct(@RequestBody StockDeductDTO dto);

    @PostMapping("/reduce")
    R<Void> reduceStock(@RequestParam("skuId") Long skuId,@RequestParam("num") Integer num);
}